<?php
namespace app\shop\controller;
class Shop extends Base{

    //编辑店铺信息
    public function edit(){
        log_test('cookie_shop_edit',$_COOKIE);
        if(is_post()){
            $d = $this->post;
            unset($d['file']);
            $re = $this->db->update("shop",$d,['id=?',[$this->userinfo['id']]]);
            if($re){
                cookie('js_msg','修改成功');
                cookie('js_function','reload');
                return suc();
            }else{
                err('修改失败');
            }
        }
        $this->fetch();
    }
}
?>
